<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
	<meta http-equiv="X-UA-Compatable" content="IE=edge,Chrome=1.0">
	<meta name="format-detection" content="telephone=no">
	<meta name="format-detection" content="email=no">   
	<title>购买记录</title>
	
	<link rel="stylesheet" href="{$_C.hy_path}css/main5.css">
	<link  rel="stylesheet" href="{$_C.hy_path}css/normalize.css">
</head>
<body >
	
	<div class="stuff_list record">
		<p class="title"><span></span>购物记录</p>
		
		
		
		
		<a href="javascript:get_card_after_saved()" class="stuff row">
		拉起卡券
		</a>
						
		
		
		
	</div>
	<!-- 弹框 -->


<script src="{$_C.hy_path}/js/less.min.js"></script>
<script src="{$_C.hy_path}/js/zepto.min.js"></script>
<script src="{$_C.hy_path}/js/main.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	
<script>
		   
		  wx.config({
		    debug: true, 
		   appId: '{$jsdk.appId}',
				timestamp: {$jsdk.timestamp},
				nonceStr: '{$jsdk.nonceStr}',
				signature: '{$jsdk.signature}',
		    jsApiList: [
		      // 所有要调用的 API 都要加到这个列表中
			  'onMenuShareTimeline',
	      	  'onMenuShareAppMessage',
		      'addCard',
			  'chooseWXPay'
		     
		    ]
		  });
		
		  
		  wx.ready(function () {
			
			 wx.onMenuShareTimeline({
			    title: '【G4慈善专场】小王子体验馆门票',
			     link:'http://g4.shfyuan.com/xy/index.php?g=mobile&m=wxpay&a=main',
			     imgUrl: 'http://g4.shfyuan.com/xy/Mobile/Webroot/gf/images/picture/little_king.png',
			      trigger: function (res) {
			       
			      },
			      success: function (res) {
			    	 // document.getElementById('mcover').style.display='';
					//	showMsg("分享成功。");
			      },
			      cancel: function (res) {
			       
			      },
			      fail: function (res) {
			        showMsg(JSON.stringify(res));
			      }
		    });
		    
			wx.onMenuShareAppMessage({
			    link:'http://g4.shfyuan.com/xy/index.php?g=mobile&m=wxpay&a=main',
			     title: '【G4慈善专场】小王子体验馆门票',
			    desc: '【G4慈善专场】小王子体验馆门票--每一张正票我们有10元 捐给爱心直达基金',
			  	imgUrl: 'http://g4.shfyuan.com/xy/Mobile/Webroot/gf/images/picture/little_king.png',
			    success: function () { 
			    	//document.getElementById('mcover').style.display='';
			    	//showMsg("分享成功。");
			    },
			    cancel: function () { 
			        // 用户取消分享后执行的回调函数
			    }
		});
			  
		  
	 	 
 	  
		  });
	
		  
		  function get_card_after_saved(){
		  
		  
				try_card();
			
		  }
		  function try_card()
		  {
			
			  var url = "index.php?g=mobile&m=picture&a=ajaxCard2";
				
			 
				$.post(url,"",function(cardlist){
					 wx.addCard({
			              cardList: cardlist,
			              success: function (res) {
			            	
			            	  
			            	  
			            	 alert("success");
			            	  
			              }
			            });
					 
					 
				},"json");
          	  
            	
		  }
		  
		  
		
		  
		 
			 
		
		</script>
		
</body>
</html>